package com.heima.admin.controller.v1;

import com.heima.admin.service.AdAdminService;
import com.heima.common.dtos.ResponseResult;
import com.heima.model.Admin.dtos.AdLoginDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 用户控制器
 */
@RestController
@RequestMapping("/login")
public class ApAdminController {
    @Autowired
    private AdAdminService adminService;

    /**
     * 登录
     */
    @PostMapping("/in")
    public ResponseResult<Map<String,Object>> login(@RequestBody AdLoginDto dto){
        return adminService.login(dto);
    }
}